# -*- coding: utf-8 -*-
# @Time    : 2022/11/7 10:45
# @Author  : yangyuexiong
# @Email   : yang6333yyx@126.com
# @File    : run.py
# @Software: PyCharm

from flask import Flask, request, Blueprint
from flask.views import MethodView

api = Blueprint('api', __name__)


class DevProcess(MethodView):
    """开发流程Api"""

    def get(self):
        """1"""
        return 'GET DevProcess'

    def post(self):
        """创建流程"""

        data = request.get_json()
        process_list = data.get('process_list')

        return 'DevProcess'


api.add_url_rule('/dev_process', view_func=DevProcess.as_view('dev_process_api'))

app = Flask(__name__)
app.register_blueprint(api, url_prefix='/api')

if __name__ == '__main__':
    # pip install pipreqs
    # pyinstaller.exe -w -F --key yangyuexiong server.py
    app.run(host='0.0.0.0', port=5000)
